package com.mysoft.gfyx.marketdevelop.service.impl;

import com.mysoft.framework.cache.api.CacheProvider;
import com.mysoft.framework.service.AppService;
import com.mysoft.gfyx.common.concurrency.CacheAgentService;
import com.mysoft.gfyx.marketdevelop.service.InspectDeveloperService;
import com.mysoft.gfyx.marketdevelop.service.MaintainanceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class MaintainanceServiceImp extends AppService implements MaintainanceService {
    @Resource
    private CacheProvider cacheProvider;

    @Resource
    private CacheAgentService cacheAgentService;

    public boolean clearCache(String cacheKey) {
        cacheProvider.delete(cacheKey);
        cacheAgentService.deleteCacheDate(cacheKey);
        System.out.println("已删除缓存" + cacheKey);
        return true;
    }
}
